<?php
define('IN_ECS', true);
require('../includes/init.php');
include_once('../comm.php');

$picid = isset($_POST['pid'])?$_POST['pid']:0;
$hotarea = isset($_POST['hotarea'])?$_POST['hotarea']:'';

if($picid==0 || $hotarea==''){
    echo 'can not save'.$picid.$hotarea;
    exit;
}

$sql = "update ".$_table_goods_source." set hotarea= '".$hotarea."' where img_id=".$picid;
$data = $db->query($sql);
//echo var_dump($data);

if($data){
    $result = $data;
}else{
    $result = $sql;   
}
echo $result;
?>